package com.example.codegen.model;

import lombok.Data;

@Data
public class Column {

    private String columnName;

    private Integer ordinalPosition;

    private String columnDefault;

    private Boolean isNullable;

    private String dataType;

    private Integer characterMaximumLength;

    private Integer numericPrecision;

    private Integer numericScale;

    private Boolean isPrimaryKey;

    private Boolean isAutoIncrement;

    private String columnComment;

    public void setColumnComment(String columnComment) {
        if (columnComment != null) {
            this.columnComment = columnComment.replaceAll("\\r?\\n", "    ");
        }
    }
}
